package com.stroke.tools.animation;

import com.stroke.util.IOHelper;

import java.awt.*;
import java.io.File;

/**
 * Author: Igor Bubelov
 * Date: 3/9/11 9:01 PM
 */
public class ImageItem {
    private File file;
    private Image image;
    private int position;

    public ImageItem(File file, int position) {
        this.file = file;
        this.position = position;
        this.image = IOHelper.loadImage(file);
    }

    public File getFile() {
        return file;
    }

    public Image getImage() {
        return image;
    }

    public int getPosition() {
        return position;
    }

    public void incPosition() {
        position++;
    }

    public void decPosition() {
        position--;
    }

    @Override
    public String toString() {
        return String.valueOf(position);
    }
}